package com.cloud.haiyan_file.service;

import com.cloud.haiyan_base.service.SuperService;
import com.cloud.haiyan_file.entity.File;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

public interface FileService extends SuperService<File> {
    /**
     * 多文件上传
     *
     * @param path
     * @param request
     * @param filedatas
     * @return
     */
    String uploadImgs(String path, HttpServletRequest request, List<MultipartFile> filedatas, Map<String, String> qiNiuConfig);

    /**
     * 多文件上传
     *
     * @param file
     * @return
     */
    Map<String, List<String>> uploadImgs(MultipartFile[] file, Map<String, String> qiNiuConfig);

    /**
     * 通过URL上传图片
     *
     * @return
     */
    Object uploadImgByUrl();

    /**
     * 工具栏“插入\编辑超链接”的文件上传
     *
     * @return
     */
    Object fileUpload(HttpServletRequest request);

    /**
     * 图像中的图片上传
     *
     * @return
     */
    Object imgUpload(HttpServletRequest request);
}
